package com.es.pay.visitorScore;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class DeleteAllVisitorScoreDoAction extends ActionSupport implements ServletRequestAware{

	private static final long serialVersionUID = 1L;
	HttpServletRequest request;
	 
	public String execute()throws Exception
	{
		String[] shopIds = (String[]) request.getParameterMap().get("shop_id");
		ArrayList<ArrayList> queryParms = new ArrayList<ArrayList>();
		if(shopIds != null){			
			for(int i = 0; i < shopIds.length; ++i){
				ArrayList ary = new ArrayList();
				ary.add(shopIds[i]);
				queryParms.add(ary);
			}		
		}
	  VisitorScoreBiz biz = new VisitorScoreBiz();
	   boolean bool = biz.deleteAllVisitorGradeDo(queryParms);
	   if(bool)
		   request.setAttribute("message", "删除店神访评分操作成功！");
	   else
		   request.setAttribute("message", "删除神访评分操作产生错误！");
	   return "success";
	}

	public void setServletRequest(HttpServletRequest request) {
	     this.request = request;
	}
	
}